import _fetch from './request'
// 获取技巧列表数据
export function articlesTechnic (params) {
  return _fetch({
    url: '/articles/technic',
    params
  })
}

// 获取市场数据
export function chartDataHot () {
  return _fetch({
    url: '/chart-data/hot'
  })
}

// 获取分享列表数据
export function articlesShare (params) {
  return _fetch({
    url: '/articles/share',
    params
  })
}

// 面经热搜
export function articlesShareTopSearch () {
  return _fetch({
    url: '/articles/shareTopSearch'
  })
}

// 文章详情
export function articlesShareInfo (id) {
  return _fetch({
    url: '/articles/share/' + id
  })
}

// 获取分享评论列表
export function articlesCommentList (id, params) {
  return _fetch({
    url: '/articles/comments/' + id,
    params
  })
}

// 发表评论
export function sendArticlesComments (data) {
  return _fetch({
    url: '/articles/comments',
    needToken: true,
    method: 'post',
    data
  })
}
// 收藏 面经
export function articlesCollect (data) {
  return _fetch({
    url: 'articles/collect',
    method: 'post',
    needToken: true,
    data
  })
}

// 面经点赞
export function articlesStar (data) {
  return _fetch({
    url: '/articles/star',
    method: 'post',
    needToken: true,
    data
  })
}
// 面经评论点赞
export function articleCommentsStar (data) {
  return _fetch({
    url: '/article-comments/star',
    method: 'post',
    needToken: true,
    data
  })
}

// export { articlesTechnic }
